package com.iakuil.app.domain.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 书籍数据传输对象
 *
 * @author Kai
 * @date 2023-11-28
 **/
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "书籍")
public class BookDto implements Serializable {

    @Schema(description = "ID")
    private Long id;

    @Schema(description = "标题")
    private String title;

    @Schema(description = "出版社名称")
    private String pressName;

    @Schema(description = "作者姓名")
    private String authorName;

    @Schema(description = "ISBN")
    private String isbn;

    @Schema(description = "价格")
    private BigDecimal price;

    @Schema(description = "出版日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date publishDate;
}
